<?xml version="1.0" encoding="UTF-8"?>
<handler name="Topic">
	<results>
		<!-- blogX error results -->
		<result value="error_admin"  type="page" sect="errors" sub="blogX" proc="error" page="admin">user is not a blogspace administrator</result>
		<result value="error_blogx"  type="page" sect="errors" sub="blogX" proc="error" page="general">general</result>
		<result value="error_delete"  type="page" sect="errors" sub="blogX" proc="error" page="admin">cannot delete blogspace admin</result>
		<result value="error_confirm"  type="page" sect="errors" sub="blogX" proc="error" page="confirm">new password is not confirmed</result>
		<result value="error_duplicate" type="page" sect="errors" sub="blogX" proc="error" page="duplicate">blogspace with this name exists</result>
		<result value="error_exists"  type="page" sect="errors" sub="blogX" proc="error" page="exists">user with this name exists</result>
		<result value="error_spaceexist"  type="page" sect="errors" sub="blogX" proc="error" page="exists">blogspace does not exist</result>
		<result value="error_userexist"  type="page" sect="errors" sub="blogX" proc="error" page="exists">user does not exist</result>
		<result value="error_expired"  type="page" sect="errors" sub="blogX" proc="error" page="expired">token expired</result>
		<result value="error_group"  type="page" sect="errors" sub="blogX" proc="error" page="group">unknown rights group</result>
		<result value="error_inactive" type="page" sect="errors" sub="blogX" proc="error" page="inactive">blogspace is not active</result>
		<result value="error_loadblog" type="page" sect="errors" sub="blogX" proc="error" page="loadblog">blog not loaded</result>
		<result value="error_loadspace" type="page" sect="errors" sub="blogX" proc="error" page="loadspace">blogspace not loaded</result>
		<result value="error_notexist" type="page" sect="errors" sub="blogX" proc="error" page="notexist">user with this name does not exist</result>
		<result value="error_notoken"  type="page" sect="errors" sub="blogX" proc="error" page="notoken">user is not logged on</result>
		<result value="error_password" type="page" sect="errors" sub="blogX" proc="error" page="password">incorrect password</result>
		<result value="error_right"  type="page" sect="errors" sub="blogX" proc="error" page="right">access denied</result>
		<result value="error_valid"  type="page" sect="errors" sub="blogX" proc="error" page="valid">token not valid</result>
		<result value="notOK"  type="page" sect="errors" sub="blogX" proc="error" page="general">general</result>
	</results>
	<!-- List thoughtspace (contains author list) -->
	<process name="List" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="contentxml" sect="blogs" sub="blogspace" proc="topics" page="list">OK</result>
		</results>
	</process>
	<process name="Add" updateprofile="yes">
		<call type="soap" fields="no" operation="AddTopic">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">Topic</parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="type" type="profile">SpaceType</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">List</result>
			<result value="error_exists" type="page" sect="blogs" sub="blogspace" proc="topics" page="exists">Topic exists</result>
		</results>
	</process>
	<process name="Edit" updateprofile="yes">
		<call type="soap" fields="no" operation="EditTopic">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">Topic</parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="type" type="profile">SpaceType</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">List</result>
		</results>
	</process>
	<process name="Delete" updateprofile="yes">
		<call type="soap" fields="no" operation="DeleteTopic">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">Topic</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">List</result>
		</results>
	</process>
	<!-- Get/Add user blog -->
	<process name="GetBlog" updateprofile="yes">
		<call type="soap" fields="no" operation="GetTopicBlog">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">id</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="topics" page="image">OK</result>
			<result value="error_blogexist" type="page" sect="blogs" sub="blogspace" proc="topics" page="image">OK</result>
		</results>
	</process>
	<process name="AddBlog" updateprofile="yes">
		<call type="soap" fields="no" operation="AddTopicBlog">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">id</parameter>
			<parameter name="author" type="value"></parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="image" type="file">ImageFile</parameter>
			<parameter name="html" type="profile">Text</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">List</result>
		</results>
	</process>
	<!-- Get User details for editing/deleting-->
	<process name="GetAdd" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="contentxml" sect="blogs" sub="blogspace" proc="topics" page="add">OK</result>
		</results>
	</process>
	<process name="GetEdit" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="topics" page="edit">OK</result>
		</results>
	</process>
	<process name="GetDel" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="page" sect="blogs" sub="blogspace" proc="topics" page="delete">OK</result>
		</results>
	</process>
	<!-- Upload image to blogspace -->
	<process name="AddImage" updateprofile="yes">
		<call type="soap" fields="no" operation="AddTopicImage">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">id</parameter>
			<parameter name="filename" type="file">ImageName</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="process">List</result>
		</results>
	</process>
	<!-- Update topic (edit + addblog) to blogspace -->
	<process name="Update" updateprofile="yes">
		<call type="soap" fields="no" operation="UpdateTopic">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
			<parameter name="topic" type="profile">Topic</parameter>
			<parameter name="label" type="profile">Label</parameter>
			<parameter name="type" type="profile">SpaceType</parameter>
			<parameter name="author" type="value"></parameter>
			<parameter name="title" type="profile">Title</parameter>
			<parameter name="image" type="profile">ImageName</parameter>
			<parameter name="html" type="profile">Text</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="0">
			<result value="0" type="process">List</result>
		</results>
	</process>
	<!-- change blogspace to get a new topic list -->
	<process name="SetBlogspace" updateprofile="yes">
		<call type="soap" fields="no" operation="GetSpace">
			<parameter name="token" type="token"/>
			<parameter name="name" type="profile">BlogSpaces</parameter>
		</call>
		<errors file="handler_errors.xml"/>
		<results type="node" value="//Result/Result_Code" default="error_blogx">
			<result value="0" type="process">List</result>
		</results>
	</process>
</handler>